import can

# 创建bus对象
bus = can.interface.Bus(interface='socketcan', channel='vcan0', receive_own_messages=True)

# 创建一个CAN信息帧
msg = can.Message(arbitration_id=0x98, data=[0x01, 0x02, 0x03, 0x04], is_extended_id=False)

# 发送CAN信息帧
bus.send(msg)

# 关闭bus
bus.shutdown()
